<template>
  <swiper>
    <swiper-item v-for="item in banners" :key="item.index">
      <a :href="item.link">
        <img :src="item.image" @load="SwiperLoadImg" />
      </a>
    </swiper-item>
  </swiper>
</template>

<script>
import { Swiper, SwiperItem } from "../../../components/common/swiper";
export default {
  name: "homeSwiper",
  props: {
    banners: {
      type: Array,
      default() {
        return [];
      },
    },
  },
  components: {
    Swiper,
    SwiperItem,
  },
  data(){
return {
isEmit:false
}
  },
  methods:{
    SwiperLoadImg(){
      // if(!this.isEmit){
        this.$emit('SwiperLoadImg');
        this.isEmit=true;
      // }
      
    }
  }
};
</script>

<style>
</style>